/**
 * 核算系统接口
 */
import { httpJ} from '../conf/index-json'
import {  baseURL} from '../conf'
// import qs from 'qs'

/** *********************************  核算系统首页   ************************************/
// 根据用户id查询账簿 接口
/* 传参
 startyear,
 endyear,
 userid,
 token
*/
export const getAccountBookListByUserAndYear = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBook/getAccountBookListByUserAndYear`, { params }).then(res => res.data)
}

// 伙食费余额变动曲线图数据查询 接口
/* 传参
accountbookId  账簿id
totalAnalysisType 查询类型(0:年度;1:月份)
beginTime	开始时间
endTime	结束时间
*/
export const getHuoShiTotalAnalysis = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/getHuoShiTotalAnalysis`, params).then(res => res.data)
}

// 经费账全景图查询接口
/* 传参
accountbookId 账簿id
beginTime 开始时间
endTime 结束时间
*/
export const getTotalAnalysisBySubject = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/getTotalAnalysisBySubject`, params).then(res => res.data)
}
/** *********************************  会计科目页面接口   ************************************/
// 获取 经费账科目 或 粮秣账科目 接口
/* 传参
  subjectType: 0, // 经费账、1粮秣账
  userid: this.vuex_user.base.id, // 用户id
  current: 1,
  year: 2021,
  size: 10
*/
export const getAllSubject = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Subject/getSubjectByTypeAndYear`, { params }).then(res => res.data)
}
// 根据用户id查询账簿 接口
/* 传参
  token
  userid
*/
export const getAccountBookListByUser = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBook/getAccountBookListByUser`, { params }).then(res => res.data)
}

// 添加科目 （经费账或粮秣账） 接口
/* 传参
 subjectcode String  科目编码
subjectname String  科目名称
subjecttype Integer  科目类型(0经费账,1粮秣帐)
subjecttype1 Integer  科目类别(0主体科目,1分类科目)
isvalid Integer  是否在用(0否1是)
userid Integer  用户id
isInit Integer 是否初始化(0是1否)
token String
accountbookId Integer  账簿id
*/
export const getAddSubject = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Subject/addSubject`, { params }).then(res => res.data)
}

// 查询科目代码 接口
/* 传参
subjecttype: 0
userid: 3
token: BEFG6430BEFG6430BEFG6430BEFG6430
*/
export const getNewSubjectCode = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Subject/getNewSubjectCode`, { params }).then(res => res.data)
}

// 删除经费账科目或粮秣账科目 接口
/* 传参
subjectid
userid: 3
token: BEFG6430BEFG6430BEFG6430BEFG6430
*/
export const getdeleteSubject = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Subject/deleteSubject`, { params }).then(res => res.data)
}

// 修改保存经费账科目或粮秣账科目 接口
/* 传参
subjectcode: 1220
subjectname: 测试
subjecttype: 0
subjecttype1: 1
isvalid: 1
userid: 3
isInit: 1
token: BEFG6430BEFG6430BEFG6430BEFG6430
*/
export const getmodifySubject = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Subject/modifySubject`, { params }).then(res => res.data)
}

// 获取分户科目代码 接口
/* 传参
partentid
userid
token
*/
export const getChildSubjectCode = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Subject/getChildSubjectCode`, { params }).then(res => res.data)
}

// 添加分户科目 接口
/* 传参
subjectcode 110101编号
subjectname 测试科目名字
subjecttype1 0 科目类别(0主体;1分类)

subjecttype 1 科目类型(0经费;1粮秣)

partentid 1父科目id
userid 2
token 1
accountbookId 12账簿id
*/
export const getaddChildSubject = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Subject/addChildSubject`, { params }).then(res => res.data)
}

/** *********************************  业务摘要页面接口   ************************************/
// 根据类别和账簿年份查询摘要 接口
/* 传参
abstractType 1 类型
current 1
size 10
userid: this.vuex_user.base.id, // 用户id
year 2022 账簿年度
*/
export const getAbstractByTypeAndYear = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Abstract/getAbstractByTypeAndYear`, { params }).then(res => res.data)
}

/** *********************************  业务摘要页面-收付保存摘要页面接口   ************************************/
// 添加摘要时获取摘要代码  接口
/* 传参
userid Integer
token String
abstracttype Integer 摘要类型(0经费;1粮秣)
*/
export const getNewAbstractCode = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Abstract/getNewAbstractCode`, { params }).then(res => res.data)
}

// 根据类型、账簿id查询业务类型(不分页) 接口
/* 传参
accountBookId Integer 账簿
token String
abstractType Integer  摘要类型(0经费;1粮秣)
userid Integer 用户id
*/
export const getBusiniessAccountBookId = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Abstract/getBusiniessAccountBookId`, { params }).then(res => res.data)
}

// 添加摘要(非智能) 接口
/* 传参
abstracttype 0 Integer 类型(0经费;1粮秣)
isvalid 1 Integer 是否在用(0否;1是)
userid 3 Integer
isInit 1 Integer 是否初为始化摘要(0是;1否)
token BEFG6430BEFG6430BEFG6430BEFG6430 String
abstractcode 2002 String 编码
abstractname 测试 String 名称
iszhineng 0 Integer 是否智能
businesstype 物资盘盈 String 业务类型
subjectlist [] String 科目(智能摘要时必填)
accountbookId 3 Integer 账簿id
*/
export const addAbstract = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Abstract/addAbstract`, { params }).then(res => res.data)
}

// 添加摘要(非智能) 接口
/* 传参
abstracttype 0 Integer 类型(0经费;1粮秣)
isvalid 1 Integer 是否在用(0否;1是)
userid 3 Integer
isInit 1 Integer 是否初为始化摘要(0是;1否)
token BEFG6430BEFG6430BEFG6430BEFG6430 String
abstractcode 2002 String 编码
abstractname 测试 String 名称
iszhineng 0 Integer 是否智能
businesstype 物资盘盈 String 业务类型
subjectlist [] String 科目(智能摘要时必填)
accountbookId 3 Integer 账簿id
*/
export const addZhineng = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Abstract/addZhineng`, params).then(res => res.data)
}


// 修改保存摘要 接口
/* 传参
abstracttype 0 Integer 类型(0经费;1粮秣)
isvalid 1 Integer 是否在用(0否;1是)
userid 3 Integer
isInit 1 Integer 是否初为始化摘要(0是;1否)
token BEFG6430BEFG6430BEFG6430BEFG6430 String
abstractcode 2002 String 编码
abstractname 测试 String 名称
iszhineng 0 Integer 是否智能
businesstype 物资盘盈 String 业务类型
subjectlist [] String 科目(智能摘要时必填)
*/
export const modifyZhineng = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Abstract/modifyZhineng`, params).then(res => res.data)
}
// 根据类型、用户id和账簿id查询所有在用科目(不分页) 接口
/* 传参
subjectType Integer 类型(0经费账,1粮秣帐)
userid Integer 用户id
token String
accountBookId Integer 账簿id
*/
export const getSubjectToCertificate = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Subject/getSubjectToCertificate`, { params }).then(res => res.data)
}

// 删除摘要 接口
/* 传参
abstractid Integer摘要id
userid Integer 用户id
token String
*/
export const deleteAbstract = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Abstract/deleteAbstract`, { params }).then(res => res.data)
}

// 修改功能根据名字查找智能下的表格数据 接口
/* 传参
abstractname
userid
token
*/
export const getZhineng = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Abstract/getZhineng`, { params }).then(res => res.data)
}
/** *********************************  数据初始化页面接口   ************************************/


// 数据初始化 接口
/* 传参
abstractname
userid
token
*/
export const dataInitialization = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Abstract/dataInitialization`, { params }).then(res => res.data)
}

/** *********************************  账簿列表页面接口   ************************************
// 删除账簿 接口
/* 传参
token String
userid Integer
accountbookId Integer
*/
export const deleteAccountBookByAccountbookId = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBook/deleteAccountBookByAccountbookId`, { params }).then(res => res.data)
}

// 添加账簿前校验是否存在活动账簿 接口
/* 传参
token String
userid Integer
*/
export const chekckAccountBook = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBook/chekckAccountBook`, { params }).then(res => res.data)
}

// 添加账簿 接口
/* 传参
year 2021 Integer 账簿年度
manager 1 String 主管人
managerrank 11 String 主管人职别
operator 2 String 经营人
operatorrank 22 String 经营人职别
department 软件部 String 单位
token 1 String
userid 3 Integer
balance 0 Double 期初余额
yearSubject 0 Integer 科目(0表示系统初始化科目,具体年份则年份账簿科目)
yearAbstract 0 Integer 摘要(同科目)
*/
export const addAccountBook = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBook/addAccountBook`, { params }).then(res => res.data)
}

// 账簿交接 接口
/* 传参
accountbookId	账簿ID
afterManager	交接后主管人(30)
afterManagerRank	交接后主管人职别(30)
afterOperator	交接后经管人(30)
afterOperatorRank	交接后经管人职别(30)
afterDepartment	交接后单位(30)
remark	交接备注(50)
*/
export const addRecord = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/AccountBookRecord/addRecord`, params).then(res => res.data)
}
// 交接记录  接口
/* 传参
accountbookId	账簿ID
*/
export const getRecordListByAccountBookId = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBookRecord/getRecordListByAccountBookId`, { params }).then(res => res.data)
}
/** *********************************  手工录入页面接口   ************************************/
// 查询活动账簿 接口
/* 传参
userid Integer
token String
*/
export const getAccountBook = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBook/getAccountBook`, { params }).then(res => res.data)
}

// 查询凭证号码 接口
/* 传参
accountyear: that.data.accountyear,
department: '一连',
userid: '3',
*/
export const getLastCertSn = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Certificate/getLastCertSn`, { params }).then(res => res.data)
}
// 根据账簿id和类型查询摘要(不分页) 接口
/* 传参
accountBookId 16 Text 是
token 1 Text 是
userid 12 Text 是
abstractType 0 Text
*/
export const getAbstractByAccountBookIdAndType = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Abstract/getAbstractByAccountBookIdAndType`, { params }).then(res => res.data)
}
// 凭证入账 接口
/* 传参
*/
export const addCertificateInfo = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/addCertificateInfo`, params).then(res => res.data)
}
/** *********************************  智能录入页面接口   ************************************/
// 根据业务类型查找对应科目数据 接口
/* 传参
abstractId
abstractType
*/
export const getSubByAbsId = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/getSubByAbsId`, params).then(res => res.data)
}
/** *********************************  自动记账设置页面接口   ************************************/
// 根据账簿ID查询自动记账摘要 接口
/* 传参
accountBookId 账簿id(传0表示查询初始化数据)
isZhineng 智能(固定传1)
isvalid 是否在用(固定传1)
*/
export const queryAllSmartAccountByAccountBookId = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/smartAccount/queryAllSmartAccountByAccountBookId`, params).then(res => res.data)
}
// 设置默认参数 接口
/* 传参
    abstractId: abstractId,
    abstractcode: abstractcode,
    abstractname: abstractname,
    abstractType: abstracttype,
    defaultscene: defaultscene,
    isvalid: 1,
    isZhineng: 1
*/
export const mdfDefaultMod = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/smartAccount/mdfDefaultMod`, params).then(res => res.data)
}
/** *********************************  自动记账页面接口   ************************************/
// 查询自动记账 接口
/* 传参
status
current
size
*/
export const queryZdrz = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/smartAccount/queryZdrz`, { params }).then(res => res.data)
}
// 自动记账入账 接口
/* 传参
accountBookId 账簿id
department 单位
operatorId 用户id
operatorname 用户名
billno 账单编号
isznjzflag 智能记账标识(固定传1)
smartAccountDtoList	 [{
  sceneFlag 1入库, 2出库,3盘点,4交伙,5退伙
  moneyOrWeight 金额或重量
  jflmFlag 经费粮秣标识(0经费1粮秣)
  staplecertypename 原料名称(经费为null,粮秣写名称)
}]


*/

// 根据账簿ID自动记账
export const addZNCertificateByAccountBookId = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/smartAccount/addZNCertificateByAccountBookId`, params).then(res => res.data)
}

/** *********************************  凭证查询-经费账查询页面接口   ************************************/

// 根据用户id查询账簿 接口
/* 传参
token 1 Text 是
userid 12 Text 是
*/
export const getAccountBookByUserId = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBook/getAccountBookByUserId`, { params }).then(res => res.data)
}

// 查询所有科目(不分页) 接口
/* 传参
accountbookId 账簿id
subjecttype 科目类型(0经费,1粮秣)
userid 用户id
token token
*/
export const getAllSubjectList = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Subject/getAllSubjectList`, params).then(res => res.data)
}

// 凭证查询-经费账 接口
/* 传参
abstractType: 0
beginTime: "2022-01-01"
certificateSn: "2"
current: 1
endTime: "2022-04-22"
isznjzflag: 2
order: 1
size: 10
accountbookId: this.selectForm.accountbookId,
*/
export const queryJFCertificate = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/queryJFCertificate`, params).then(res => res.data)
}

// 经费凭证明细 接口
/* 传参
certificateId
*/
export const queryJFCertificateFee = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Certificate/queryJFCertificateFee`, { params }).then(res => res.data)
}

// 删除凭证接口
/* 传参
certificateId
abstractType
accountYear
department
certificateSn
*/
export const deleteCertificate = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/deleteCertificate`, params).then(res => res.data)
}

// 经费凭证导出接口
/* 传参
certificateId	凭证id
*/
export const jFPZExport = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Report/jFPZExport`, { params }).then(res => res.data)
}


/** *********************************  凭证查询-粮秣账查询页面接口   ************************************/
// 凭证查询-粮秣账 接口
/* 传参
abstractType: 0
beginTime: "2022-01-01"
certificateSn: "2"
current: 1
endTime: "2022-04-22"
isznjzflag: 2
order: 1
size: 10
accountbookId: this.selectForm.accountbookId,
*/
export const queryLMCertificate = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/queryLMCertificate`, params).then(res => res.data)
}


// 粮秣凭证明细 接口
/* 传参
certificateId
*/
export const queryLMCertificateStaple = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Certificate/queryLMCertificateStaple`, { params }).then(res => res.data)
}

// 粮秣凭证导出接口
/* 传参
certificateId	凭证id
*/
export const lMPZExport = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Report/lMPZExport`, { params }).then(res => res.data)
}

/** *********************************  账簿查询-经费账查询页面接口   ************************************/
// 账簿查询-经费账 接口
/* 传参
accountbookId: 30
beginTime: "2022-01-01"
current: 1
endTime: "2022-04-22"
order: 1
size: 10
subjectName: "实物折款"
token: "4448e083b7714b6cab8034040d750726"
*/
export const queryJFAccount = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/queryJFAccount`, params).then(res => res.data)
}
/** *********************************  账簿查询-粮秣账查询页面接口   ************************************/
// 账簿查询-粮秣账 接口
/* 传参
accountbookId: 30
beginTime: "2022-01-01"
current: 1
endTime: "2022-04-22"
order: 1
size: 10
subjectName: "实物折款"
token: "4448e083b7714b6cab8034040d750726"
*/
export const queryLMAccount = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/queryLMAccount`, params).then(res => res.data)
}
/** *********************************  账簿查询-经费账账查询详情页面接口   ************************************/

// 账簿查询-经费账详情 接口
/* 传参
abstractName: "结转下年"
abstractType: "0"
certificateId: "4"
token: "4448e083b7714b6cab8034040d750726"
*/
export const queryCertByCertIdAndAbstr = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/queryCertByCertIdAndAbstr`, params).then(res => res.data)
}

/** *********************************  账簿查询-经费账账查询详情页面接口   ************************************/

// 账簿查询-科目余额表查询 接口
/* 传参
accountbookId 账簿ID
beginTime	string 查询开始时间
endTime	string 查询结束时间
current 页数
size 每页条数
*/
export const getAllSubjectTotal = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/getAllSubjectTotal`, params).then(res => res.data)
}

/** *********************************  会计报表-试算平衡表页面接口   ************************************/
// 根据账户ID查询试算平衡表 接口
/* 传参
startTime 是 2022-04-01
endTime 是 2022-04-30
operatorId 是 12
*/
export const getReportByOperatorId = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Report/getReportByOperatorId`, { params }).then(res => res.data)
}

// 根据日期查询试算平衡表 接口
/* 传参
beginDate 查询日期开始
endDate 查询日期结束
accountBookId 账簿id
*/
export const getBalanceReportByDate = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Report/getBalanceReportByDate`, params).then(res => res.data)
}

// 生成试算平衡 接口
/* 传参
department string 部门,  如一连
operatorname string 操作人名称
userid string 操作人id
abstractType string 摘要类型   0经费账 1粮秣账
proBalanceDate string 格式为  YYYY-mm  生成试算平衡表的日期   用于和当前月比对,只有当前月才能生成试算平衡表
mock: 2021-05
accountBookId integer 账簿ID
*/
export const produceBalanceReport = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Report/produceBalanceReport`, params).then(res => res.data)
}
// 试算平衡表导出(新) 接口
/* 传参
beginDate 开始时间
endDate 结束时间
accountBookId	账簿id
*/
export const balanceExportByDate = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Report/balanceExportByDate`, params).then(res => res.data)
}
// 查询月伙食公布表(新) 接口
/* 传参
accountBookId账簿id
date查询月份(格式:yyyy-MM)
*/
export const getYueHuoShiAndYueFood = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Yuehuoshi/getYueHuoShiAndYueFood`, { params }).then(res => res.data)
}
// 添加/修改月伙食公布表 接口
/* 传参
accountBookId账簿id
date查询月份(格式:yyyy-MM)
*/
export const saveYueHuoShiAndYueFood = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Yuehuoshi/saveYueHuoShiAndYueFood`, params).then(res => res.data)
}
// 生成伙食公布表 接口
/* 传参
accountBookId 账簿ID
date 生成伙食公布表的月份(格式:yyyy-MM-dd)
*/
export const createYueHuoShi = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Yuehuoshi/createYueHuoShi`, { params }).then(res => res.data)
}
// 月伙食公布表导出(新) 接口
/* 传参
yuehuoshiId 月伙食公布表id
*/
export const getExcelExportById = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Yuehuoshi/getExcelExportById`, { params }).then(res => res.data)
}

/** *********************************  年终总结-结转下年页面接口   ************************************/
// 查询未结转账簿 接口
/* 传参
userid用户ID
token
*/
export const getAccountNoCarryOver = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/AccountBook/getAccountNoCarryOver`, { params }).then(res => res.data)
}
// 查看结转明细 接口
/* 传参
accountBookId 账簿id
operatorId 用户id
operatorName 用户名称
*/
export const carryOverNextYearExhibition = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Certificate/carryOverNextYearExhibition`, { params }).then(res => res.data)
}

// 结转下年 接口
/* 传参
accountbookId 账簿id
abstractName:"生产收益补贴（上级补）",
operatorname:"张二麻子",
operatorid:105,
remark:"备注",
subjectDtoList:[]
*/
export const carryOverNextYear = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/carryOverNextYear`, params).then(res => res.data)
}
/** *********************************  年终总结-上年转入页面接口   ************************************/
// 上年转入明细查询 接口
/* 传参
accountBookId
token
*/
export const carryOverLastYearExhibition = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Certificate/carryOverLastYearExhibition`, { params }).then(res => res.data)
}
// 上年转入 接口
/* 传参
accountBookId 转出账簿id
accountBookLastId 转入账簿ID
abstractName 摘要
remark 备注
operatorId 用户ID
operatorName 用户名
*/
export const carryOverLastYear = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Certificate/carryOverLastYear`, { params }).then(res => res.data)
}

/** *********************************  年终总结-期初余额页面接口   ************************************/
// 期初余额页面接口
/* 传参
accountBookId 账簿id
*/
export const getSubByIdToBaseBalance = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/Certificate/getSubByIdToBaseBalance`, { params }).then(res => res.data)
}


// 添加期初余额 接口
/* 传参
*/
export const addBaseBalance = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Certificate/addBaseBalance`, params).then(res => res.data)
}
export const getMonthMealsList = (params = {}) => {
  return httpJ.get(`${baseURL}/api/hesuan/report/getMonthlyMealsApply`,{params}).then(res => res.data)
}
//查询伙食费领取列表
export const getMouthMealList = (params = {}) => {
  return httpJ.post(`${baseURL}/api/organ/report/getMonthlyMealsApplyListByPage`, params).then(res => res.data)
}
export const getMonthlyMealsPublishList = (params = {}) => {
  return httpJ.post(`${baseURL}/api/organ/publish/getMonthlyMealsPublishList`, params).then(res => res.data)
}
export const getMealsPublishDetail = (params = {}) => {
  return httpJ.get(`${baseURL}/api/organ/publish/getMealsPublishDetail`, {params}).then(res => res.data)
}

export const getMonthlyMealsApplyDetail = (params = {}) => {
  return httpJ.get(`${baseURL}/api/organ/report/getMonthlyMealsApplyDetail`, {params}).then(res => res.data)
}
// 添加期初余额 接口
/* 传参
*/
export const saveMealsApply = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/report/saveMonthlyMealsApply`, params).then(res => res.data)
}

export const reportMonthMealApply = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/report/reportMonthlyMealsApply`, params).then(res => res.data)
}

export const reportMonthlyMealsPublish = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/Yuehuoshi/reportMonthlyMealsPublish`, params).then(res => res.data)
}
export const monthlyMealsReportExcel = (params = {}) => {
  return httpJ.post(`${baseURL}/api/hesuan/report/monthlyMealsReportExcel`, params,{responseType: 'blob'}).then(res => res.data)
}